import axios from '@/api/service.js';
import api from '@/pub/unit_api.js';

//api 统一控制api前缀

var base_url = api.api.system;
export default {
  //规则查询
  queryRule: param => {
    return axios.post(base_url + '/sys-rule/querySysRule', param);
  },
  //规则删除
  delSysRule: param => {
    return axios.post(base_url + '/sys-rule/delSysRule', param);
  },
  //规则保存or修改
  editSysRule: param => {
    return axios.post(base_url + '/sys-rule/sysRuleEdit', param);
  },
  //初始化规则数据
  initSysRule: param => {
    return axios.post(base_url + '/sys-rule/getRuleModelByCode', param);
    // return axios.get('/bookRuleData.json');
  },
  //规则缓存

  //规则下拉字典
  getSysRule: () => {
    return axios.post(base_url + '/sys-rule/getSysRule');
  },
  //规则校验取值
  checkBookRule: param => {
    return axios.post(base_url + '/sys-book/checkBookRule', param);
  },

  //规则书籍查询
  queryBookMain: param => {
    return axios.post(base_url + '/sys-book/querySysBook', param);
  },
  //书规则章节查询
  queryBookChapter: param => {
    return axios.post(base_url + '/sys-book/querySysBookChapter', param);
  },
  //阅读页取出数据
  querySysBookReader: param => {
    return axios.post(base_url + '/sys-book/querySysBookReader', param);
  },
};
